home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000165_icon-group-sender _Mon Jul 29 17:04:44 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Mon, 29 Jul 1996 11:17:39 MST
  2. Message-Id: <31FCE11C.1C7E@tees.ac.uk>
  3. Date: Mon, 29 Jul 1996 17:04:44 +0100
  4. From: Hamish Lawson <H.Lawson@tees.ac.uk>
  5. Organization: University of Teesside
  6. X-Mailer: Mozilla 3.0b5aGold (Win95; I)
  7. Mime-Version: 1.0
  8. To: icon-group@cs.arizona.edu
  9. Subject: Preserving success/failure across disjoint expressions
  10. References: <9606221325.AA26435@ursus.cs.arizona.edu> <31D3FA40.1435@tees.ac.uk>
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14. Status: O
  15.  
  16. Suppose that I evaluate some expression, then later in the program I
  17. want to evaluate some other expression but only of the earlier one
  18. succeeded. What is the most idiomatic way of doing this in Icon? I've
  19. done something along the lines below, but I'm just a little
  20. uncomfortable with the arbitrariness of the assignment to succeeded.
  21.  
  22.    e1 & succeeded := 1
  23.    ...
  24.    if \succeeded then e2
  25.  
  26. | Hamish Lawson, School of Computing and Mathematics, 
  27. | University of Teesside, Middlesbrough, Cleveland, UK, TS1 3BA 
  28. | Tel: +44 1642 212695  Fax: +44 1642 342604
  29. | E-mail: H.Lawson@tees.ac.uk
  30.